package com.itheima.thread.常用方法.demo3;

import java.util.concurrent.Callable;

public class MyCallable implements Callable<String> {
    @Override
    public String call() throws Exception {
        for (int i = 0; i < 100; i++) {
            System.out.println(Thread.currentThread().getName() + "-----" + i);
        }
        System.out.println(Thread.currentThread().getName() + "线程执行完毕");
        return Thread.currentThread().getName() + "线程执行完毕";
    }
}
